package com.movie.modules.jf.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.movie.modules.jf.entity.ActorEntity;
import com.movie.modules.jf.entity.MovieEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 电影表
 * 
 * @author kakarot
 * @email 532050892@qq.com
 * @date 2021-08-20 21:23:04
 */
@Mapper
public interface MovieDao extends BaseMapper<MovieEntity> {
	  /**
	   * @param page
	   * @param vipId
	   * @return
	   */
  	IPage<MovieEntity> getMovieByVipId(
      IPage<MovieEntity> page, @Param("vipId") Integer vipId);

	/**
	 * 热门电影
	 * @param limit
	 * @return
	 */
	List<MovieEntity> getMovieByComment(int limit);

	List<MovieEntity> getMovieByVipAndMovie(@Param("movieId") Integer movieId,@Param("vipId") Integer vipId);

	IPage<MovieEntity> getMovieByVipAndMovieList(IPage<MovieEntity> page,@Param("vipId") Integer vipId);

	IPage<MovieEntity> getMovieByTypeId(IPage<MovieEntity> page,@Param("typeId") Integer typeId);

	/*获取电影评论数量和评分和封面的详细电影信息*/
	MovieEntity getMovieCommentScore(Integer movieId);
}
